import java.util.Random;
import java.util.Scanner;

public class Test {

    public static boolean isLeapyear(int year){
        if((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0)){
            return true;
        }else{
            return false;
        }
    }

    public static int add(int i, int j){
        return j + i;
    }
    public static double add(double i, double j){
        return j + i;
    }
//方法重载

    public static void main(String[] args) {
        //函数递归
        
    }
    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int i = scanner.nextInt();
        int j = scanner.nextInt();
        int k = add(i, j);
        double f = add(3.1, 3.1);
        System.out.println(k);
        System.out.println(f);
    }

    public static void main3(String[] args) {
        //写一个判断闰年的方法
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();
        while(isLeapyear(year)){
            System.out.println("是闰年");
            break;
        }
    }

    public static void main2(String[] args) {
        //猜数字小游戏
        Random random = new Random();
        int i = random.nextInt(100);

        //System.out.println(i);

        Scanner scanner = new Scanner(System.in);
        //int j = scanner.nextInt();

        //System.out.println(j);

        while(true){
            System.out.println("请输入你要选的数字：");
            int j = scanner.nextInt();
            if(j < i){
                System.out.println("猜小了");
            }else if(j > i){
                System.out.println("猜大了");

            }else{
                System.out.println("猜对了");
                break;
            }
        }
    }
}
